import { createRouter, createWebHistory } from 'vue-router'

import TabBar from '@/components/tabBar.vue'
const routes = [{
        path: '/',
        name: 'home',
        components: {
            default: () =>
                import ('../views/home/index.vue'),
            footer: TabBar
        }

    },
    {
        path: '/login',
        name: '登录',
        components: {
            default: () =>
                import ('../views/login/index.vue'),
            footer: TabBar
        }
    },
    {
        path: '/regsiter',
        name: '注册',
        components: {
            default: () =>
                import ('../views/regsiter/index.vue'),
            footer: TabBar
        }
    },
    {
        path: '/user',
        name: '我的',
        components: {
            default: () =>
                import ('../views/user/index.vue'),
            footer: TabBar
        }
    },
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router